home *** CD-ROM | disk | FTP | other *** search
- /* Will wrap a quoted paragraph and re-quote it.
- * $VER: ReQuote.fse 1.2 (15.04.94)
- */
-
- options results
-
- delete = '7F'x
-
- XPOS
- if result ~= 1 then do
- NEWLINE
- NEWLINE
- NEWLINE
- NEWLINE
- backlines = 2
- end
- else do
- CURRENTCHAR
- if (result = ">") then INSERTINPUT delete
- backlines = 0
- end
-
- YPOS
- breakline = result
-
- MSGLENGTH
- lastline = result
-
- /* Remove quotes from the block */
-
- do i=breakline+1 to lastline
- SETPOS 1 i
- CURRENTCHAR
- if (result ~= ">") then break
- INSERTINPUT delete
- end
-
- /* Fix the section */
-
- breakout = 0
-
- do i=breakline+1 to lastline
- SETPOS y i
- BEGOFLINE
- XPOS
- if (result = 1) then do
- ENDOFLINE
- XPOS
- if (result ~= 1) then do
- SETPOS y i-1
- ENDOFLINE
- INSERTINPUT delete||'' ''
- YPOS
- if (result = i) then do
- SETPOS x 1
- BACKSPACE
- INSERTINPUT '' ''
- end
- else do
- SETPOS y i
- ENDOFLINE
- XPOS
- if (result = 1) then
- breakout = 1
- end
- end
- else
- breakout = 1
- end
- if (breakout = 1) then break
- end
-
- /* Re-quote */
-
- do i=breakline to lastline
- SETPOS y i
- ENDOFLINE
- XPOS
- if (result = 1) then break
- SETPOS X 1
- INSERTSTRING ">"
- end
-
- SETPOS 1 breakline-backlines
-